<template>
  <el-tooltip
    :visible="visible"
    placement="left"
    effect="light"
    @update:visible="emit('update:visible', $event)"
  >
    <template #content>
      <span class="text-[#454954] text-sm"
        >支持英文字母、数字及标点符号（除空格），<br />
        区分大小写，长度6-128位</span
      >
    </template>
    <slot />
  </el-tooltip>
</template>

<script setup lang="ts">
interface IProps {
  visible: boolean
}
interface IEmits {
  (event: 'update:visible', visible: boolean): void
}

defineProps<IProps>()
const emit = defineEmits<IEmits>()
</script>

<style lang="scss" scoped></style>
